There are image sensors known in the related art in which the distance between a microlens and the corresponding light blocking unit at a focus detection pixel used to detect the focusing condition through the split pupil method, is adjusted in correspondence to the position of the focus detection pixel on the image-capturing surface (see, for instance, PTL 1). However, there is an issue yet to be addressed in the technology disclosed in PTL 1 in that the focus detection accuracy is bound to deteriorate when an interchangeable lens with a different exit pupil position is mounted.